<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head th:replace="fragments/header :: header">
</head>
<body>
<div class="container">
	<div class="mt-3">
		<h2 th:text="${userModel.title}">Welcome to Zychaowill</h2>
	</div>
	
	<table class="table table-hover">
		<thead>
			<tr>
				<td>Age</td>
				<td>Name</td>
				<td sec:authorize="hasRole('ADMIN')">Operation</td>
			</tr>
		</thead>
		<tbody>
			<tr th:if="${userModel.userList.size()} eq 0">
				<td colspan="3">No user information!</td>
			</tr>
			<tr th:each="user : ${userModel.userList}">
				<td th:text="${user.age}">16</td>
				<td th:text="${user.name}">wenchao</td>
				<td sec:authorize="hasRole('ADMIN')">
					<div>I'm an administrator.</div>
				</td>
			</tr>
		</tbody>
	</table>
</div>
<div th:replace="fragments/footer :: footer">...</div>
</body>
</html>